package com.huangguolin.cloud.api.Class.service.impl;

import com.huangguolin.cloud.api.Class.entity.ApiClassSearchEntity;
import com.huangguolin.cloud.api.Class.repository.ApiClassDao;
import com.huangguolin.cloud.api.Class.service.ApiClassService;
import com.huangguolin.cloud.mybatis.entity.PtClassEntity;
import com.huangguolin.cloud.mybatis.entity.PtUserEntity;
import com.huangguolin.cloud.mybatis.flexigrid.PagingEntity;
import com.huangguolin.cloud.mybatis.ztree.TransferEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ApiClassServiceImpl implements ApiClassService {
    @Resource
    private ApiClassDao apiClassDao;
    @Override
    public List<PtClassEntity> queryClassList(ApiClassSearchEntity entity, PagingEntity paging) {
        return apiClassDao.queryClassList(entity,paging);
    }

    @Override
    public Integer queryClassTotal( ApiClassSearchEntity entity) {
        return apiClassDao.queryClassTotal(entity);
    }

    @Override
    public void deleteClass(String classIds) {
        String[] classIdArray = classIds.split(",");
        apiClassDao.deleteClass(classIdArray);
    }

    @Override
    public void addClass(String teacher, String className, String classprofile, String cover, String privacy,String classId,String creatTime,String classNumber) {
        apiClassDao.addClass(teacher,className,classprofile,cover,privacy,classId,creatTime,classNumber);
    }

    @Override
    public List<TransferEntity> query() {
       return apiClassDao.query();
    }


}
